import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import global from '@/global';

import 'normalize.css/normalize.css'; // A modern alternative to CSS resets

import ElementUI from 'element-ui';
import '@/styles/element-variables.scss';

import '@/styles/index.scss'; // global css

import '@/icons'; // icon
import '@/router/mutation'; // permission control
import settings from '@/settings';

Vue.use(ElementUI, {
	size: store.getters.size // set element-ui default size
});
Vue.use(global);

Vue.config.productionTip = false;

if (process.env.NODE_ENV === 'development' && settings.mock) {
	const { mock } = require('../mock');
	mock();
}

new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app');
